<?php 
namespace app\common\validate;

use think\Validate;

class Staff extends Validate
{
	protected $rule = [
			'name'  =>  'require|max:5|min:2',
			'nation' =>  'require',
			'nationality' =>  'require',
			'political' =>  'require',
			'birth' =>  'require',
			'idcard' =>  'require',
	];
	
	protected $message = [
			'name.require'  =>  '员工姓名不能为空',
			'name.max'  =>  '员工姓名不超过五个字符',
			'name.min'  =>  '员工姓名不低于两个字符',
			'nation.require' =>  '民族不能为空',
			'nationality.require' =>  '国籍不能为空',
			'political.require' =>  '政治面貌不能为空',
			'birth.require' =>  '出生年月日不能为空',
			'idcard.require' =>  '身份证号码不能为空',
	];
	
	protected $scene = [
			'add'   =>  ['name','nation','nationality','political','birth','idcard'],
	];
}